package com.eliza.navs.fg

import android.os.Bundle
import android.util.Log
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.navigation.Navigation
import com.eliza.navs.R


class Fg2 : Fragment() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
    }

    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {

        Log.d(
            this::class.java.name, "Bundle:FG2 <== FG1  数据 :${
                arguments?.getString("Name")
            }"
        )

        // Inflate the layout for this fragment
        val view = inflater.inflate(R.layout.fragment_fg2, container, false)

        view.findViewById<View>(R.id.fg2_3_btn).setOnClickListener {
            Navigation.findNavController(view).navigate(R.id.action_fg2_to_fg3)
        }
        view.findViewById<View>(R.id.fg2_5_btn).setOnClickListener {
            Navigation.findNavController(view).navigate(R.id.action_fg2_to_fg5)
        }
        return view
    }

}